package com.mMap.entity.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mMap.entity.enums.DateTimePatternEnum;
import com.mMap.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;


/**
 * 思维导图信息
 */
public class MapInfo implements Serializable {


    /**
     * 思维导图名称
     */
    private String title;

    /**
     * 思维导图id
     */
    private String mapId;

    /**
     * 内容数据
     */
    private String mapData;
    /**
     * 创建人
     */
    private String creator;
    /**
     * 创建人id
     */
    private String creatorId;
    /**
     * 备注
     */
    private String remark;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 0:未使用  1:已使用
     */
    private Integer status;


    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return this.title;
    }

    public void setMapId(String mapId) {
        this.mapId = mapId;
    }

    public String getMapId() {
        return this.mapId;
    }

    public void setMapData(String mapData) {
        this.mapData = mapData;
    }

    public String getMapData() {
        return mapData;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return this.status;
    }

    @Override
    public String toString() {
        return "导图:" + (title == null ? "空" : title) + "，id:" + (mapId == null ? "空" : mapId)  + "，数据内容:" + (mapData == null ? "空" : mapData)  + "，创建人:" + (creator == null ? "空" : creator)  + "，创建人id:" + (creatorId == null ? "空" : creatorId)  + "，备注:" + (remark == null ? "空" : remark) + "，创建时间:" + (createTime == null ? "空" : DateUtil.format(createTime,
                DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern())) + "，0:未使用  1:已使用:" + (status == null ? "空" : status);
    }
}
